package com.lian.hope.enums;

/**
 * 权限类型枚举
 */
public enum PermissionType {
    PROJECT("新增项目"), ACTIVITY("新增活动"), NOTIFICATION("新增通知"), DYNAMIC("新增动态");

    private final String permission;

    PermissionType(String permission) {this.permission = permission;}

    public String getPermission() {
        return permission;
    }

    public boolean isEmpty() {
        return permission.isEmpty();
    }

    /**
     * 用户角色枚举
     */
    public enum UserRole {
        /** 管理员 */
        ADMINISTRATOR("administrator",1),
        /** 普通用户 */
        USER("user",2);

        private final String role;
        private final Integer roleCode;

        UserRole(String role, Integer roleCode) {
            this.role = role;
            this.roleCode = roleCode;
        }

        public String getRole() {
            return role;
        }


        public Integer getRoleCode() {
            return roleCode;
        }
    }
}
